#pragma once

namespace NNEC {
    enum {
        NNEC_SUCCESS = 0,
        NNEC_FAILURE = -1,
        NNEC_ERROR_GENERIC = 1000,  // generic error
        NNEC_ERROR_ZERODIV,         // divide by zero
        NNEC_ERROR_ALLOCATION,      // memory allocation failed
        NNEC_ERROR_POINTER,         // invalid pointer
        NNEC_ERROR_INVALID,         // invalid argument supplied by user
        NNEC_ERROR_RANGE,           // output range error, e.g. exp(1e100)
        NNEC_ERROR_BADINPUT,        // input error, e.g. sqrt(-1)
        NNEC_ERROR_BADFUNC,         // problem with user-supplied function
        NNEC_ERROR_BADTOLERANCE,    // invalid tolerance specified
        NNEC_ERROR_BADSIZE,         // matrix, vector sizes are not conformant
        NNEC_ERROR_BADFILE,         // file not support corresponding operation
        NNEC_ERROR_MAXITERATION,    // exceeded max number of iterations
        NNEC_ERROR_UNDERFLOW,       // underflow
        NNEC_ERROR_OVERFLOW,        // overflow
        NNEC_ERROR_TOLERANCE,       // failed to reach the specified tolerance
        NNEC_ERROR_LOSS,            // loss of accuracy
        NNEC_ERROR_ROUNDOFF,        // failed due to round off error
        NNEC_ERROR_NOTSQRMAT,       // not square matrix
        NNEC_ERROR_SINGULARITY,     // singularity detected
        NNEC_ERROR_DIVERGE,         // integral or series is divergent
        NNEC_EOF                    // end of file
    };
}
